﻿using DeZhen.DataCollection.Model.DTO.Login;
using Microsoft.AspNetCore.Mvc;

namespace DeZhen.DataCollection.WebApi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class SystemController : ControllerBase
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public SystemController()
        {
        }

        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <returns></returns>
        [HttpGet(Name = "GetMenuList")]
        public IActionResult GetMenuList()
        {
            var menuList = new List<MenuDto>
            {
                new MenuDto
                {
                    id = "0",
                    icon = "ion:layers-outline",
                    component = "LAYOUT",
                    type = "0",
                    menuName = "Dashboard",
                    permission = "",
                    orderNo = 1,
                    createTime = "1980-07-24 16:29:21",
                    status = "1",
                    children = new List<MenuDto>
                    {
                        new MenuDto
                        {
                            id = "0-0",
                            type = "1",
                            menuName = "菜单1",
                            icon = "ion:document",
                            permission = "menu1:view",
                            component = "/dashboard/welcome/index",
                            orderNo = 1,
                            createTime = "2005-05-16 12:03:44",
                            status = "1",
                            parentMenu = "0",
                            children = new List<MenuDto>
                            {
                                new MenuDto
                                {
                                    id = "0-0-0",
                                    type = "2",
                                    menuName = "按钮1-1",
                                    icon = "",
                                    permission = "menu1:view:btn1",
                                    component = "/dashboard/welcome/index",
                                    orderNo = 1,
                                    createTime = "1983-12-21 04:09:13",
                                    status = "0",
                                    parentMenu = "0-0"
                                },
                                // ... 其余按钮同理补充
                            }
                        },
                        // ... 其余菜单同理补充
                    }
                },
                // ... 其余一级菜单同理补充
            };

            return Ok(menuList);
        }
    }
}
